Hello, is there any way to take data from unsaved Excel file? Use case: - export data into Excel file, - some modifications on it in Excel file, - without to save the Excel file import into DOORS. (Currently everything works, but only in case I save the Excel file.) P.S.: I would like to stay in the same Excel file. Saving of the file isn't allowed. Anta_st - Wed Sep 02 11:45:27 EDT 2015 |
Re: Taking data from unsaved Excel file I do not understand the problem. Of course you can write some data to excel and then I can read it again without saving the file. |
Re: Taking data from unsaved Excel file Good morning Wolfgang, based on your reply I tested further, but the result is still the same: - in case of new unsaved data in Excel file, dxl doesn't recognize them and doesn't update the module if I run the import code, - in case I save the data in Excel file, dxl recognize them and update module accordingly if I run the import code. (So the only modification is before to run Import DXL I save the current Excel file, in macro:
Call SaveFile does work, just only Call StartImportDXL doesn't work.) I do following steps: - export selected data in module into Excel file, - collect external data and the exported data in the other sheet, - import the new data from the other sheet. Do you have any ideas? |
Re: Taking data from unsaved Excel file Anta_st - Thu Sep 03 03:08:32 EDT 2015 Good morning Wolfgang, based on your reply I tested further, but the result is still the same: - in case of new unsaved data in Excel file, dxl doesn't recognize them and doesn't update the module if I run the import code, - in case I save the data in Excel file, dxl recognize them and update module accordingly if I run the import code. (So the only modification is before to run Import DXL I save the current Excel file, in macro:
Call SaveFile does work, just only Call StartImportDXL doesn't work.) I do following steps: - export selected data in module into Excel file, - collect external data and the exported data in the other sheet, - import the new data from the other sheet. Do you have any ideas? Hi I do not know what your script is doing. But if I wirte something to an excel cell olePut(objRange, "Value", "A very importante remark"); I can read back this data imedately string sSomeValue; oleGet(objRange, "Value", sSomeValue); print sSomeValue "\n"; Best regards Wolfgang |
Re: Taking data from unsaved Excel file Wolfgang Uhr - Thu Sep 03 04:30:47 EDT 2015 Hi I do not know what your script is doing. But if I wirte something to an excel cell olePut(objRange, "Value", "A very importante remark"); I can read back this data imedately string sSomeValue; oleGet(objRange, "Value", sSomeValue); print sSomeValue "\n"; Best regards Wolfgang Hello Wolfgang, I've identified the place in code (code was taken from "Import from Excel" DXL
* Copyright (c) 2007-2008 and modified by me) ------------------------------------------------------------------------------------------------
/*
string getCellText(int rowNum, int col) {
I have in Excel in column A1 "Object Identifier" (saved in Excel). In column A2 I have "xx_1" (not saved in Excel). The entries weren't done by DXL.
If I run the code above DXL returns only the entry in column A1. Do you know what is wrong here? |
Re: Taking data from unsaved Excel file Anta_st - Tue Sep 08 10:35:52 EDT 2015 Hello Wolfgang, I've identified the place in code (code was taken from "Import from Excel" DXL
* Copyright (c) 2007-2008 and modified by me) ------------------------------------------------------------------------------------------------
/*
string getCellText(int rowNum, int col) {
I have in Excel in column A1 "Object Identifier" (saved in Excel). In column A2 I have "xx_1" (not saved in Excel). The entries weren't done by DXL.
If I run the code above DXL returns only the entry in column A1. Do you know what is wrong here? Hi No in this way I do not see any way to help you. Some points: 1. You must not use the selct methods! You (or the IBM-Script) uses the selection obect of excel. checkResult(oleMethod(objCell, cMethodSelect)); And this "cMethodSelect"-Selection is the wrong method. Any Mouseclick or some arbitrary event on your PC may create an error in your script. 2. Your comment is not the thing you have written getCell(rowNum, col); // gets a handle on the desired cell. The function has the name "get" and the comment speaks about a handle. But the routine did not have any output parameter. That means that you are dealig whith global constants. So I only can guess what the program is doing and I only can guess, what is going wrong. Sorry ... Best regards Wolfgang
|
Re: Taking data from unsaved Excel file Wolfgang Uhr - Mon Sep 14 07:34:47 EDT 2015 Hi No in this way I do not see any way to help you. Some points: 1. You must not use the selct methods! You (or the IBM-Script) uses the selection obect of excel. checkResult(oleMethod(objCell, cMethodSelect)); And this "cMethodSelect"-Selection is the wrong method. Any Mouseclick or some arbitrary event on your PC may create an error in your script. 2. Your comment is not the thing you have written getCell(rowNum, col); // gets a handle on the desired cell. The function has the name "get" and the comment speaks about a handle. But the routine did not have any output parameter. That means that you are dealig whith global constants. So I only can guess what the program is doing and I only can guess, what is going wrong. Sorry ... Best regards Wolfgang
Hello Wolfgang, thanks a lot for your time and comments!! I will have a look how I could do it in the most appropriate / right way :). Best regards, |
Re: Taking data from unsaved Excel file Anta_st - Mon Sep 14 08:33:33 EDT 2015 Hello Wolfgang, thanks a lot for your time and comments!! I will have a look how I could do it in the most appropriate / right way :). Best regards, You do not understand the problem, do you? Without any specific question, I only can post a text in this forum, which I easily can sell in form of a book. Please post questions which can be answered in less than 1.000 Words. |
Re: Taking data from unsaved Excel file Wolfgang Uhr - Mon Sep 14 11:48:34 EDT 2015 You do not understand the problem, do you? Without any specific question, I only can post a text in this forum, which I easily can sell in form of a book. Please post questions which can be answered in less than 1.000 Words. Did you write to me or was it a mistake? |